//
//  BHStadiumProSuitTypeCell.swift
//  BigHealth
//
//  Created by 布丁 on 2021/8/2.
//

import UIKit

class BHStadiumProSuitTypeCell: UICollectionViewCell {
    lazy var name_label: UILabel = {
        let label = UILabel.init()
        label.textAlignment = .center
        label.font = .systemFont(ofSize: 12, weight: .medium)
        label.textColor = .color_777777
        label.highlightedTextColor = .color_34CE98
        label.backgroundColor = .color_f4f4f4
        label.addLayerCorner(11, 0, .white)
        return label
    }()
    
    var model: BHStadiumDetailGoodModel! {
        didSet {
            self.name_label.text = model.name
        }
    }
    
    var chose: Bool = false {
        didSet {
            self.name_label.isHighlighted = chose
            self.name_label.backgroundColor = chose == true ? .color_E0F5ED:.color_f4f4f4
        }
    }
    
    

    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.contentView.addSubview(self.name_label)
        self.name_label.mas_makeConstraints { (make) in
            make?.left.right()?.top()?.bottom()?.equalTo()(self)
        }
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
    
}
